Software systems, such as operating systems and file systems, provide application programming interfaces through which application programs can access the services of the software systems. An application program interface may provide functions with parameters for performing a specified service. For example, a file system may have a function (also referred to as a “system call”) for creating a file. That function may have parameters that specify a file location, file name, file type, file size, and so on of the file to be created. When an application program invokes a function, it passes actual parameters corresponding to the formal parameters defined for the function. The function may perform certain checks on the actual parameters to ensure that they are valid. For example, the create file function may ensure that the specified file type is valid. If a parameter is not valid, then the function returns an error to the application program.
Software systems can be extremely complex for a variety of reasons. A software system may seek to be backward compatible with all prior versions of that software system. In such a case, the software system may need to support all the functions of the application program interface of the prior versions. Since new functions are typically added with each version, the number of functions can be very large and their interactions complex. Some software systems may also include software components developed by different divisions of the same company or by different companies. The interactions of these components can also be quite complex.
It has become increasingly important for software systems to ensure that their application programming interfaces are not vulnerable to either inadvertent misuse or intentional attack. One vulnerability of a software system may be through the parameters of its application programming interface. When the functions of prior versions are combined with those of newer versions, and when components from different developers are integrated, the existing parameter validation performed by the functions may not be sufficient to ensure correct behavior of the functions. For example, an application programming interface of a file system developed by one company may be integrated with a file server developed by another company. The maximum file size parameter of the application programming interface may be larger than that supported by the file server. In such a case, a file size that is acceptable to the application programming interface may cause problems with the file server. As another example, a system administrator may want to limit the maximum file size even further, but the system administrator may have no available means to enforce that limitation.
It would be desirable to have a mechanism for enforcing security policies and, in particular, security policies that specify valid conditions for parameters of application program interfaces.